3.47 \(\int \frac {\cos (c+d x)}{a+a \cos (c+d x)} \, dx\)

Optimal. Leaf size=29 \[ \frac {x}{a}-\frac {\sin (c+d x)}{d (a \cos (c+d x)+a)} \]

[Out]

x/a-sin(d*x+c)/d/(a+a*cos(d*x+c))

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2735, 2648} \[ \frac {x}{a}-\frac {\sin (c+d x)}{d (a \cos (c+d x)+a)} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]/(a + a*Cos[c + d*x]),x]

[Out]

x/a - Sin[c + d*x]/(d*(a + a*Cos[c + d*x]))

Rule 2648

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Simp[Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rubi steps

\begin {align*} \int \frac {\cos (c+d x)}{a+a \cos (c+d x)} \, dx &=\frac {x}{a}-\int \frac {1}{a+a \cos (c+d x)} \, dx\\ &=\frac {x}{a}-\frac {\sin (c+d x)}{d (a+a \cos (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 57, normalized size = 1.97 \[ \frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \left (d x \cos \left (\frac {1}{2} (c+d x)\right )-\sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )\right )}{a d (\cos (c+d x)+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]/(a + a*Cos[c + d*x]),x]

[Out]

(2*Cos[(c + d*x)/2]*(d*x*Cos[(c + d*x)/2] - Sec[c/2]*Sin[(d*x)/2]))/(a*d*(1 + Cos[c + d*x]))

________________________________________________________________________________________

fricas [A]  time = 0.89, size = 37, normalized size = 1.28 \[ \frac {d x \cos \left (d x + c\right ) + d x - \sin \left (d x + c\right )}{a d \cos \left (d x + c\right ) + a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)/(a+a*cos(d*x+c)),x, algorithm="fricas")

[Out]

(d*x*cos(d*x + c) + d*x - sin(d*x + c))/(a*d*cos(d*x + c) + a*d)

________________________________________________________________________________________

giac [A]  time = 0.50, size = 28, normalized size = 0.97 \[ \frac {\frac {d x + c}{a} - \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)/(a+a*cos(d*x+c)),x, algorithm="giac")

[Out]

((d*x + c)/a - tan(1/2*d*x + 1/2*c)/a)/d

________________________________________________________________________________________

maple [A]  time = 0.05, size = 37, normalized size = 1.28 \[ -\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}+\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)/(a+a*cos(d*x+c)),x)

[Out]

-1/a/d*tan(1/2*d*x+1/2*c)+2/a/d*arctan(tan(1/2*d*x+1/2*c))

________________________________________________________________________________________

maxima [A]  time = 1.22, size = 49, normalized size = 1.69 \[ \frac {\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)/(a+a*cos(d*x+c)),x, algorithm="maxima")

[Out]

(2*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a - sin(d*x + c)/(a*(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

mupad [B]  time = 0.33, size = 23, normalized size = 0.79 \[ \frac {x}{a}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)/(a + a*cos(c + d*x)),x)

[Out]

x/a - tan(c/2 + (d*x)/2)/(a*d)

________________________________________________________________________________________

sympy [A]  time = 0.75, size = 27, normalized size = 0.93 \[ \begin {cases} \frac {x}{a} - \frac {\tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a d} & \text {for}\: d \neq 0 \\\frac {x \cos {\relax (c )}}{a \cos {\relax (c )} + a} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)/(a+a*cos(d*x+c)),x)

[Out]

Piecewise((x/a - tan(c/2 + d*x/2)/(a*d), Ne(d, 0)), (x*cos(c)/(a*cos(c) + a), True))

________________________________________________________________________________________